//package com.lxf.springbootWechat.controller;
//
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//
//import org.springframework.stereotype.Controller;
//import org.springframework.web.bind.annotation.RequestMapping;
//
//import com.ramostear.captcha.HappyCaptcha;
//import com.ramostear.captcha.support.CaptchaType;
//
//import io.swagger.annotations.ApiOperation;
//
///**
// * @author:LuoXingFa;
// * @version:Date:2022年4月29日下午4:53:45
// */
//@Controller
//public class VerifyController {
//
//	/**
//	 * 验证码生成
//	 *
//	 * @param request
//	 * @param response
//	 */
//	@RequestMapping("/getVerifyCode")
//	@ApiOperation(value = "登录模块生成的验证码")
//	public void getVerificationCode(HttpServletRequest request, HttpServletResponse response) {
//		HappyCaptcha.require(request, response).type(CaptchaType.WORD_NUMBER_LOWER).build().finish();
//		HappyCaptcha.require(request, response).width(100).height(40);
//	}
//
//	/**
//	 * 验证码的校验
//	 *
//	 * @param code
//	 * @param request
//	 * @return
//	 */
//	/*
//	 * @PostMapping("/verify") public String verify(String code,HttpServletRequest
//	 * request){ //Verification Captcha boolean flag =
//	 * HappyCaptcha.verification(request,code,true); if(flag){ // 校验通过 return
//	 * "校验成功"; } return "校验失败"; }
//	 *
//	 *//**
//		 * 消除缓存
//		 *
//		 * @param request
//		 *//*
//			 * @GetMapping("/remove/captcha") public void removeCaptcha(HttpServletRequest
//			 * request){ HappyCaptcha.remove(request); }
//			 */
//}
